package com.weixing.mall.provider.service;

import com.aliyun.imagesearch20201214.models.SearchImageByPicResponseBody;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.weixing.mall.provider.api.model.dto.SearchItem;
import com.weixing.mall.provider.api.model.vo.*;
import com.weixing.mall.provider.model.domain.Goods;
import com.weixing.mall.provider.model.dto.GoodsChangeStatusDto;
import com.weixing.mall.provider.model.dto.GoodsDto;
import com.weixing.mall.provider.model.query.FrontGoodsQuery;
import com.weixing.mall.provider.model.query.GoodsPlaceOrderQuery;
import com.weixing.mall.provider.model.query.GoodsQuery;
import com.weixing.mall.provider.model.query.HotGoodsQuery;
import com.weixing.mall.provider.model.vo.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.List;

/**
 * <p>
 * 商品模块-商品表 服务类
 * </p>
 *
 * @author Small
 * @since 2019-11-20
 */
public interface IGoodsService extends IService<Goods> {

    void delAll(int []ids);

    IPage<GoodsVo> selectOfPage(Page page, GoodsQuery goodsQuery);
    List<GoodsVo> selectNoPage( GoodsQuery goodsQuery);
    Long save(GoodsDto goodsDto);

    void ChangeStatus(GoodsChangeStatusDto goodsChangeStatusDto);

    GoodsDetailsVo selectById(Long id);


    IPage<GoodsVo> selectListByIdsPage (Page page,int[] ids);
    GoodsEsVo selectGoodsSearchVo(long goodsId);

    SearchItem selectItemVo(long goodsId) throws IOException;

    List<GoodsPlaceVo> selectGoods(GoodsPlaceOrderQuery goodsPlaceOrderQuery);

    IPage<GoodsPlaceVo> selectByGoodsInfo(Page page,GoodsPlaceOrderQuery goodsPlaceOrderQuery);

    IPage hotGoods(Page page,HotGoodsQuery hotGoodsQuery);

    SpuVo loadModel(Long idN,Long actId,Long mid);

    Page<FrontGoodsVo> loadModelByGoodsSn(Page page, String goodsSn);

    IPage<FrontGoodsVo> selectFrontGoods(Page page, FrontGoodsQuery frontGoodsQuery);

    Goods selectByGoodsSn(String goodsSn);

   Goods checkGoods(String goodsSn,String styleNo);
    List<CategoryVo> findByName(String catName);

    void sortGoods(int sortType);

    List<GoodsPlaceVo> listByGoodSn(List<String> goodsSn);

    List<ItemVo>  importByOrderSn(MultipartFile file,Long depotId);

    IPage<FrontGoodsVo>  selectActFrontGoods(Page page,FrontGoodsQuery frontGoodsQuery);

    Goods selectByStyleNo(String styleid);

    List<ItemVo> importExcelInDepot(MultipartFile file);

    List<SearchImageByPicResponseBody.SearchImageByPicResponseBodyAuctions> imgSerchList(MultipartFile file, Integer pageSize, Long actId );

    IPage<GoodsVo>  selectNoSkuList(Page initMpPage, GoodsQuery goodsQuery);

    void exprotList(GoodsQuery goodsQuery, HttpServletResponse response) throws MalformedURLException;

    List<SkuVo> skuList(Long id);

    List<SkuVo> skuList(Long id, Long actId);
}
